﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xpus.Website.Utilities;

namespace Xpus.Website.Core.UrlTools
{
	/// <summary>
	/// 当URL格式错误时发生。
	/// </summary>
	public class UrlFormatException : Exception
	{
		/// <summary>
		/// 构造一个<see cref="UrlFormatException"/>异常。
		/// </summary>
		/// <param name="originalUrl">完整的URL。</param>
		/// <param name="errorPart">出错的部分。</param>
		public UrlFormatException(string originalUrl, string errorPart)
			: base(string.Format(LanguageUtility.GetString("'{0}' is not a valid domain name. The error part is '{1}'."), originalUrl, errorPart))
		{
		}
	}
}
